package com.db.ionio.serialization;

import java.io.Serializable;
import java.util.Random;

/**
 * @author Alexander Kotov (kotov.alex.22@gmail.com)
 */
public class SensorData implements Serializable {
	private double longitude;
	private double latitude;
	private double elevation;
	private double temperature;
	private static Random random = new Random();

    public SensorData(double longitude, double latitude, double elevation, double temperature) {
        this.longitude = longitude;
        this.latitude = latitude;
        this.elevation = elevation;
        this.temperature = temperature;
    }
	
	public double getLongitude() {
		return longitude;
	}
	public double getLatitude() {
		return latitude;
	}
	public double getElevation() {
		return elevation;
	}
	public double getTemperature() {
		return temperature;
	}
	
	public static SensorData generate() {
		return new SensorData(random.nextDouble(), random.nextDouble(), random.nextDouble(), random.nextDouble());
	}
}